﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;

namespace Computer_Manager.DAL
{
    public class DAL_Backup
    {
        DbProvider db = new DbProvider();
        SqlCommand cmd;

        public void Backup_DB(string path)
        {
            db.Open();
            cmd = new SqlCommand("Backupdatabase", db.getConn());
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@path", SqlDbType.VarChar).Value = path;
            cmd.ExecuteNonQuery();
            cmd.Dispose();

        }
    }
}
